WIP: jl/neobank demo generalize kyc controller - #9929
Draft
jiexi wants to merge 11 commits into
Draft
Conversation
Parameterize vendor HTTP and the consents path so KYC stays vendor-neutral, and add refreshKycStatus / statusChanged for user-keyed KYC status. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…tus polling Stored terms acceptance now records the vendor it was given for, so one vendor's disclaimer ids can no longer satisfy another vendor's flow. `refreshKycStatus` no longer restarts polling when a `reset()` landed mid-request, and `acceptTermsAndStartSession` accepts a zero-argument call again. Co-authored-by: Cursor <cursoragent@cursor.com>
…s to null The optional `accessToken` and `country` params could be `undefined`, which is not assignable to TanStack's `Json`-constrained `QueryKey`, breaking the build. Co-authored-by: Cursor <cursoragent@cursor.com>
- Fix cross-vendor terms reuse by invalidating null termsAcceptedVendor (Bugbot #1) - Add validation for MoonPay checkKycRequired params (accessToken, country required) - Check fetch availability before binding in KycService constructor - Reorder bearer token check before assert() for better error messages - Add T&C2 flag persistence (sumsubTncAccepted, idosTncAccepted) for consents-path resume - Standardize vendor parameter naming (vendorId → vendor in createUkycSession) - Add comprehensive test coverage for new validation paths Co-authored-by: George Weiler <georgejweiler@gmail.com>
Co-authored-by: George Weiler <georgejweiler@gmail.com>
Do not default omitted sumsubTncSigned/idosTncSigned to true when starting a non-MoonPay session. MoonPay callers may still omit them. Co-authored-by: Cursor <cursoragent@cursor.com>
Make sumsubTncSigned and idosTncSigned required for every vendor. Zero-argument calls and omitted flags fail instead of defaulting to true. Co-authored-by: Cursor <cursoragent@cursor.com>
…generalize-kyc-controller Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # packages/kyc-controller/CHANGELOG.md # packages/kyc-controller/src/KycController-method-action-types.ts # packages/kyc-controller/src/KycController.test.ts # packages/kyc-controller/src/KycController.ts # packages/kyc-controller/src/KycService-method-action-types.ts # packages/kyc-controller/src/KycService.test.ts # packages/kyc-controller/src/KycService.ts # packages/kyc-controller/src/index.ts # packages/kyc-controller/src/types.ts
jiexi
marked this pull request as draft
August 20, 2026 21:47
Member
Author
|
@metamaskbot publish-preview |
Member
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Combines the big core PR and generalized vendor changes to the kyc-controller here and then makes necessary changes to the ramps-controller to adopt those kyc-controller changes
References
Checklist
Note
High Risk
Touches identity/KYC orchestration, persisted terms, bearer-authenticated vendor APIs, and wallet ownership signing. Breaking T&C2 and terms-vendor migration can force reacceptance and break existing callers.
Overview
Adds a vendor-parameterized KYC flow so Money/VBA can use Iron without MoonPay Check/Auth frames: empty-shell customer → vendor disclaimers → consents → SumSub.
KycProductgains'money'andKycVendorgains'iron'.Breaking:
acceptTermsAndStartSessionnow requires explicitsumsubTncSigned/idosTncSigned(no defaulttrue). Stored terms are vendor-scoped via persistedtermsAcceptedVendor;null(pre-migration) forces reacceptance so disclaimer IDs are never reused across vendors.New controller surface:
createVendorCustomer,getCustomerIdentity,refreshKycStatusplusKycController:statusChangedwith pending-status polling.KycServiceparameterizes/vendors/{vendor}/…, adds consents andGET /kyc/status, optional nativefetch, and richer HTTP error bodies.Ramps: Money Account wallet registration moves here from kyc-controller. Adds
createAutorampand NeoBank Pix/quote/customer/self-hosted-wallet APIs. Customer id prefersKycController:getCustomerIdentity, then Profile Sync + neobank-proxy. Hosts must delegateRAMPS_CONTROLLER_REQUIRED_CONTROLLER_ACTIONS.Reviewed by Cursor Bugbot for commit 90394c9. Bugbot is set up for automated code reviews on this repo. Configure here.